package vue;

import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;

import javax.swing.ImageIcon;
import javax.swing.JLabel;

import modele.Pion;	

public class VuePion extends JLabel implements MouseListener{
	
	private Pion pion;

	/**
	 * Constructeur VuePion
	 * @param monPion
	 * @param cheminImagePion 
	 */
	public VuePion(Pion monPion, String cheminImagePion){
		
		super(new ImageIcon(cheminImagePion));
		this.pion = monPion;
	}
	
	/**
	 * retourne le pion de VuePion
	 * @return
	 */
	public Pion getPion(){
		return this.pion;
	}
	
	/**
	 * Implement le champ pion de VuePion
	 * @param monPion
	 */
	public void setPion(Pion monPion){
		this.pion = monPion;
	}
	
	/**
	 * Retourne l'image correspondant à VuePion
	 * @return JLabel
	 */
	public JLabel getImagePion(){
		return this;
	}
	
	/**
	 * Active le click
	 */
    public void activClick(){
        addMouseListener(this);
    }

    /**
     * Désactive le click
     */
    public void desactivClick(){ 
        removeMouseListener(this);
    }
	
	@Override
	public void mouseClicked(MouseEvent arg0) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void mouseEntered(MouseEvent arg0) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void mouseExited(MouseEvent arg0) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void mousePressed(MouseEvent arg0) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void mouseReleased(MouseEvent arg0) {
		// TODO Auto-generated method stub
		
	}
	

}
